]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: ignore D-Bus requests when the OSK isn't enabled
authorDan Winship <danw@gnome.org>
Tue, 27 Sep 2011 18:55:38 +0000 (14:55 -0400)
committerDan Winship <danw@gnome.org>
Thu, 29 Sep 2011 14:28:49 +0000 (10:28 -0400)
Fixes spurious warnings about "this.actor is null" when processing
org.gnome.Caribou.Keyboard messages when the keyboard isn't enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=659940

js/ui/keyboard.js

index ffcb3875cf6264d5b3511031ddcfa38e091c956d..2eb355fb0d0ec98cf8af1f6b30965d0ad9f56f13 100644 (file)
@@ -476,6 +476,9 @@ Keyboard.prototype = {
 
     // D-Bus methods
     Show: function(timestamp) {
+        if (!this._enableKeyboard)
+            return;
+
         if (timestamp - this._timestamp < 0)
             return;
 
@@ -484,6 +487,9 @@ Keyboard.prototype = {
     },
 
     Hide: function(timestamp) {
+        if (!this._enableKeyboard)
+            return;
+
         if (timestamp - this._timestamp < 0)
             return;
 
@@ -492,10 +498,16 @@ Keyboard.prototype = {
     },
 
     SetCursorLocation: function(x, y, w, h) {
+        if (!this._enableKeyboard)
+            return;
+
 //        this._setLocation(x, y);
     },
 
     SetEntryLocation: function(x, y, w, h) {
+        if (!this._enableKeyboard)
+            return;
+
 //        this._setLocation(x, y);
     },